using SPI.AgentServer.Models;

namespace SPI.AgentServer.Services.Metadata;

public interface ISchemaRegistry
{
    Task<List<string>> ListDatabasesAsync(CancellationToken cancellationToken = default);
    Task<List<string>> ListTablesAsync(string? databaseName = null, CancellationToken cancellationToken = default);
    Task<TableSchema?> GetTableSchemaAsync(string tableName, string? databaseName = null, CancellationToken cancellationToken = default);
    Task<List<string>> GetSampleSqlAsync(string tableName, string? databaseName = null, CancellationToken cancellationToken = default);
    Task RefreshSchemaAsync(string? databaseName = null, CancellationToken cancellationToken = default);
    bool HasPermission(string tableName, string operation, string? databaseName = null);
}
